<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<link rel="stylesheet" type="text/css" href="css/games.css">
<script type="text/javascript">
  (function() {
   var po = document.createElement('script');
   po.type = 'text/javascript';
   po.async = true;
   po.src = 'https://apis.google.com/js/client:plusone.js';
   var s = document.getElementsByTagName('script')[0];
   s.parentNode.insertBefore(po, s);
 })();
function signinCallback(authResult) {
  if (authResult['status']['signed_in']) {
    // Update the app to reflect a signed in user
    // Hide the sign-in button now that the user is authorized, for example:
    document.getElementById('signinButton').setAttribute('style', 'display: none');
  } else {
    // Update the app to reflect a signed out user
    // Possible error values:
    //   "user_signed_out" - User is signed-out
    //   "access_denied" - User denied access to your app
    //   "immediate_failed" - Could not automatically log in the user
    console.log('Sign-in state: ' + authResult['error']);
  }
}
</script>
<table>
	<tr>
		<td>
			<form method="post" action="/games/login.do" name="login-form">
				<table>
					<tr><td colspan="2" id="login_error" width="300px" class="error"></td></tr>
					<tr><td><label for="login_email_id"><spring:message code="label.email"/></label></td><td><input type="email" name="email" autocomplete="on" id="login_email_id" required="true" data-dojo-type="dijit/form/ValidationTextBox"></td></tr>
					<tr><td><label for="login_password"><spring:message code="label.password"/></label></td><td><input type="password" name="password" autocomplete="on" id="login_password" required="true" data-dojo-type="dijit/form/ValidationTextBox"></td></tr>
					<tr><td></td><td><button onclick="login();" data-dojo-type="dijit/form/Button" type="button"><spring:message code="label.loginsubmit"/></button> <a class="frgt-pswd" href="">Forgot your password?</a></td></tr>
				</table>
			</form>
		</td>
		<td>OR</td>
		<td>
			<span id="signinButton">
			  <span
				class="g-signin"
				data-callback="signinCallback"
				data-clientid="846761579063-1d9p6ua6l70com9b6jlrtbpi2grtbr0u.apps.googleusercontent.com"
				data-cookiepolicy="single_host_origin"
				data-requestvisibleactions="http://schemas.google.com/AddActivity"
				data-scope="https://www.googleapis.com/auth/plus.login">
			  </span>
			</span>
		</td>
	</tr>
</table>